-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
up = forward, down = backward, left = left, right = right
/* | ||
* public CommandBase testDriveDriver() { | ||
* return sequence( | ||
* moveForDirectional(0, 1, 5), | ||
* moveForDirectional(1, 0, 5), | ||
* moveForDirectional(0, -1, 5), | ||
* moveForDirectional(-1, 0, 5)); | ||
* } | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We generally don't want to keep commented code
driveController.povDown().onTrue(drive.moveForDirectional(0, 1, 5)); | ||
driveController.povRight().onTrue(drive.moveForDirectional(1, 0, 5)); | ||
driveController.povUp().onTrue(drive.moveForDirectional(0, -1, 5)); | ||
driveController.povLeft().onTrue(drive.moveForDirectional(-1, 0, 5)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit nervous about having these mappings on the drive controller. It's pretty dangerous to have a command that can cause the robot to take off in a direction without a way to easily stop it.
And if this happens during a match at the very least it'll cause lost time.
I think these would be best on the dashboard (https://docs.wpilib.org/en/stable/docs/software/dashboards/shuffleboard/advanced-usage/shuffleboard-commands-subsystems.html#displaying-commands).
Or at the very least make these whileTrue
instead of onTrue
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably slow this down a bit too, not sure it needs to be at 1m/s, maybe 0.5?
We should also make sure we put the units of values in argument names.
public CommandBase testDriveDriver() { | ||
return sequence( | ||
drive.moveForDirectional(0, 1, 5), | ||
drive.moveForDirectional(1, 0, 5), | ||
drive.moveForDirectional(0, -1, 5), | ||
drive.moveForDirectional(-1, 0, 5)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look like this is used anywhere either, can we remove it?
Drive test program -- mapped to buttons to spin wheels forward, backward, right, and left for 5 seconds. Intended to be a simple way to test wheels easily in the pits. Branch [arm-updates] was already merged in for simplifying testing.